<ion-view class="home" hide-nav-bar="true">
	<div class="header" ng-class="{'header-ios':isIOSApp}">
		<div class="row">
			<div class="imgCol mr20" ng-class="{'mr10':input.citysName.length>3}" ng-click="openCity($event)">
				<img src="./img/guilin/home/icon_address@2x.png"/>
				<p class="city">{{input.citysName|limitTo:4}}</p>
			</div>
			<div class="col inputCol">
				<div class="row">
					<div class="selectType" ng-click="openSort($event)">
						{{input.goodsChoice==0?'商品':'品牌'}}
						<i class="icon ion-arrow-down-b right-zhang"></i>
					</div>
					<div class="col">
						<form action="javascript:return false;" ng-submit="onshow_productsearch()">
							<input type="search" placeholder="关键字" ng-model="input.keywords">
						</form>
					</div>
					<div ng-if="search_open">
						<img src="./img/guilin/home/icon_xj@2x.png" ng-click="onshow_imgsearch()" class="cameraImg" />
						<input id="upfilebutton" type="file" accept="image/*" onchange="angular.element(this).scope().upload(this)" style="display: none;" />
					</div>
				</div>
			</div>
			<div class="imgCol ellipsis ml20" on-tap="onshow_scan()" ng-if="is_app"><!--扫一扫-->
				<img src="./img/guilin/home/icon_sao@2x.png" />
				<p class="city">扫一扫</p>
			</div>
			<div class="imgCol ml20" ng-click="onshow_message()" ng-if="!is_app"><!--站内信-->
				<img src="./img/guilin/center/email_icon.png" style="margin-top: 5px;"/>
				<span class="emailNun" ng-if="mail_count>0">{{mail_count<1000?mail_count:'999+'}}</span>
			</div>
		</div>
	</div>
	
	<!--描述：滑动块-->
	<ion-content scroll="false" class="bg" ng-class="{'bg-ios':isIOSApp}" lazy-scroll>
		<ion-scroll delegate-handle="main-handle" direction="y" ng-style="myObj" on-scroll="doShowTop('main-handle',999)" lazy-scroll>
			<!--描述：下拉刷新-->
			<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
			<!--描述：打开APP-->
			<div class="doapp" ng-if="isNotApp">
				<div class="actions" ng-click="doclose()"><i class="icon ion-ios-close-outline"></i></div>
				<div class="alltabs">
					<img src="./img/logo.png" />
					<div class="lasttabs">
						<div class="titles">
							<div class="main">未来万家网上商城App</div>
							<div class="sub">随时随地 想购就购</div>
						</div>
						<a class="buttons" href="txwjapp://www.wlwj.com/">立即打开</a>
					</div>
				</div>
			</div>
			<!--描述：轮播广告-->
			<div class="swiper-container advs">
				<div class="swiper-wrapper">
					<div class="swiper-slide blue-slide" ng-repeat="obj in advs">
						<div class="box" ng-click="onshow_advs(obj)">
							<img src="{{obj.image_id}}" />
						</div>
					</div>
				</div>
				<!-- Add Pagination -->
				<div class="swiper-pagination advs" style="position: absolute;bottom: 0;"></div>
			</div>
			
			<!--菜单-->
			<div class="menus">
				<div class="menusItem" ng-class="{'menusItemBig':!isLogin_menu}" ng-repeat="obj in menus.normal" ng-if="obj.user_type >= user_type" ng-click="onshow_menu(obj.value)">
					<img src="{{obj.img}}" />
					<p>{{obj.title}}</p>
				</div>
			</div>
			
			<!--9个活动-->
			<div class="comTitleDiv"><img src="./img/guilin/home/icon_jchd@2x.png" /></div>
			
			<!--活动-->
			<div class="activity">
				<!--没有数据时，用假数据-->
				<div class="row xsAndms" ng-class="{'mb0':user_type==5}">
					<div class="col col-50 xianshi" ng-click="onshow_activity(3)"><!--限时抢购-->
						<div class="titleDiv">
							<img src="./img/guilin/home/icon_xsqg@2x.png"/>
						</div>
						<div class="row picRow">
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.timedbuy.goods[0].image||'./img/guilin/home/test/xianshi1.png'}}"/>
								</div>
							</div>
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.timedbuy.goods[1].image||'./img/guilin/home/test/xianshi2.png'}}"/>
								</div>	
							</div>
						</div>
					</div>
					<!--（登录：秒杀）或（未登录：新品测试、新品公告、新品赠送）-->
					<div class="col col-50 miaosha" ng-if="user_type <= 4" ng-click="onshow_activity(2)">
						<div class="titleDiv">
							<img src="./img/guilin/home/icon_mx@2x.png" />
							<span class="text">有抽奖哦！</span>
						</div>
						<div class="row picRow">
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.spike.goods[0].image||'./img/guilin/home/test/miaosha1.png'}}"/>
								</div>
							</div>
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.spike.goods[1].image||'./img/guilin/home/test/miaosha2.png'}}"/>
								</div>
							</div>
						</div>
					</div>
					<div class="col col-50" ng-if="user_type == 5">
						<div class="row"><!--新品测试、新品公告、新品赠送-->
							<div class="col col-50 newTestAnNotice"><!--新品测试和新品公告-->
								<div class="newTest" ng-click="onshow_activity(5)"><!--新品测试-->
									<img src="./img/guilin/home/icon_xpcs@2x.png" class="titleImg"/>
									<div class="comImgDiv">
										<img src="{{activities.newtest.goods[0].image||'./img/guilin/home/test/newtest1.png'}}"/>
									</div>
								</div>
								<div class="newNotice" ng-click="onshow_activity(7)"><!--新品公告-->
									<img src="./img/guilin/home/icon_xpgg@2x.png" class="titleImg"/>
									<div class="comImgDiv">
										<img src="{{activities.newnotice.goods[0].image||'./img/guilin/home/test/newnotoice1.png'}}"/>
									</div>
								</div>
							</div>
							<div class="col col-50 newGive" ng-click="onshow_activity(6)"><!--新品赠送-->
								<img src="./img/guilin/home/icon_xpzs@2x.png" class="titleImg"/>
								<div class="comImgDiv">
									<img src="{{activities.newsend.goods[0].image||'./img/guilin/home/test/newsend1.png'}}" style="top: 26px;"/>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				<!--商品促销-->
				<div class="cuxiao" ng-if="user_type <= 4" ng-click="onshow_activity(9)">
					<div class="titleDiv">
						<img src="./img/guilin/home/icon_spcx@2x.png" />
					</div>
					<div class="row">
						<div class="col">
							<div class="comImgDiv">
								<img src="{{activities.promotiongoodsimage.goods[0].image||'./img/guilin/home/test/cuxiao1.png'}}" />
							</div>
						</div>
						<div class="col">
							<div class="comImgDiv">
								<img src="{{activities.promotiongoodsimage.goods[1].image||'./img/guilin/home/test/cuxiao2.png'}}" />
							</div>
						</div>
						<div class="col">
							<div class="comImgDiv">
								<img src="{{activities.promotiongoodsimage.goods[2].image||'./img/guilin/home/test/cuxiao3.png'}}" />
							</div>
						</div>
						<div class="col">
							<div class="comImgDiv">
								<img src="{{activities.promotiongoodsimage.goods[3].image||'./img/guilin/home/test/cuxiao4.png'}}" />
							</div>
						</div>
					</div>
				</div>
				
				<!--直播和竞拍-->
				<div class="row zhiboAndJp" ng-if="user_type <= 4">
					<!--直播-->
					<div class="col col-50 zhibo" ng-click="onshow_activity(8)">
						<div class="zc"><img src="./img/guilin/home/icon_bofang@2x.png" width="20"/></div>
						<img src="./img/guilin/home/icon_zb@2x.png" class="titleImg"/>
						<img src="{{activities.promotiongoods.goods[0].image||'./img/guilin/home/test/zhibo1.png'}}" style="width: 100%;height: {{zhiboHeight}}px;"/>
					</div>
					<!--竞拍-->
					<div class="col col-50 jp" ng-click="onshow_paimami()">
						<div class="row">
							<div><img src="./img/guilin/home/icon_jp@2x.png" class="titleImg"/></div>
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.auction.goods[0].image||'./img/guilin/home/test/jp1.png'}}" class="goodsImg" />
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="clearfix"></div>
				
				<!--疯狂团购、新品测试、新品公告、新品赠送-->
				<div class="row" style="background-color: white;" ng-if="user_type <= 4">
					<div class="col col-50 tuangou" ng-click="onshow_activity(1)"><!--疯狂团购-->
						<img src="./img/guilin/home/icon_fktg@2x.png" class="titleImg"/>
						<div class="row">
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.groupbuy.goods[0].image||'./img/guilin/home/test/tuangou1.png'}}"/>
								</div>
							</div>
							<div class="col">
								<div class="comImgDiv">
									<img src="{{activities.groupbuy.goods[1].image||'./img/guilin/home/test/tuangou2.png'}}"/>
								</div>
							</div>
						</div>
					</div>
					<div class="col col-50"><!--新品测试、新品公告、新品赠送-->
						<div class="row">
							<div class="col col-50 newTestAnNotice"><!--新品测试和新品公告-->
								<div class="newTest" ng-click="onshow_activity(5)"><!--新品测试-->
									<img src="./img/guilin/home/icon_xpcs@2x.png" class="titleImg"/>
									<div class="comImgDiv">
										<img src="{{activities.newtest.goods[0].image||'./img/guilin/home/test/newtest1.png'}}"/>
									</div>
								</div>
								<div class="newNotice" ng-click="onshow_activity(7)"><!--新品公告-->
									<img src="./img/guilin/home/icon_xpgg@2x.png" class="titleImg"/>
									<div class="comImgDiv">
										<img src="{{activities.newnotice.goods[0].image||'./img/guilin/home/test/newnotoice1.png'}}"/>
									</div>
								</div>
							</div>
							<div class="col col-50 newGive" ng-click="onshow_activity(6)"><!--新品赠送-->
								<img src="./img/guilin/home/icon_xpzs@2x.png" class="titleImg"/>
								<div class="comImgDiv">
									<img src="{{activities.newsend.goods[0].image||'./img/guilin/home/test/newsend1.png'}}" style="top: 26px;"/>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<!--我的供应商 ng-if="supp_slider.length>0"-->
			<div class="comTitleDiv" ng-if="supp_slider.length>0"><img src="./img/guilin/home/icon_wdgys@2x.png" /></div>
			<div style="background-color: white;" ng-if="supp_slider.length>0">	<!--保证白色背景-->
				<div class="mySupplier" id="mySupplier">
					<!--<marquee direction="left" behavior="alternate" scrollamount="3" id="mySupplierMarquee">-->
					<div class="supplierDiv ellipsis" ng-repeat="supplier in supp_slider" ng-click="onshow_shop(supplier)">
						<img src="{{supplier.image_place1}}" class="supplierImg"/><br />
						<img src="./img/guilin/common/icon_shop@2x.png" class="storeImg"/>{{supplier.store_name}}
					</div>
					<!--<div class="supplierDiv ellipsis">
						<img src="./img/bg-sb.png" class="supplierImg"/><br />
						<img src="./img/guilin/common/icon_shop@2x.png" class="storeImg"/>上海代理1
					</div>-->
					<!--</marquee>-->
				</div>
			</div>
			
			<!--品牌推荐-->
			<div class="comTitleDiv" ng-if="brand_slider.length>0"><img src="./img/guilin/home/icon_pptj@2x.png" /></div>
			<div class="swiper-container recommendBrand" ng-if="brand_slider.length>0">
				<div class="swiper-wrapper">
					<div class="swiper-slide" ng-repeat="br in brand_slider">
						<div class="swiper-row" ng-repeat="brand in br.brands">
							<div class="swiper-col " ng-repeat="obj in brand" ng-click="onshow_brand(obj)">
								<img src="{{obj.brand_logo}}">
							</div>
						</div>
					</div>
				</div>
				<!-- Add Pagination -->
				<div class="swiper-pagination recommendBrand"></div>
			</div>
			
			<!--新品推荐-->
			<div class="comTitleDiv" ng-if="news_slider.length>0"><img src="./img/guilin/home/icon_xptj@2x.png" /></div>
			<div class="swiper-container news" ng-if="news_slider.length>0">
				<div class="swiper-wrapper">
					<div class="swiper-slide" ng-repeat="new in news_slider">
						<div class="row">
							<div class="col" ng-repeat="good in new.goods" ng-class="{'pr4':$first,'prl2':$index==1,'pl4':$index==2}" ng-click="onshow_afsrue(good)">
								<div class="imgDiv">
									<img src="{{good.image||noImg}}">
								</div>
								<div class="name ellipsis-2">{{good.name}}</div>
							</div>
						</div>
					</div>
				</div>
				<!-- Add Pagination -->
				<div class="swiper-pagination news"></div>
			</div>

			<!--热销产品-->
			<div class="comTitleDiv" style="border-bottom: 1px solid #E7E7E7;" ng-if="hotList.cat.length>0"><img src="./img/guilin/home/icon_rxcp@2x.png" /></div>
			<div class="hotList" ng-repeat="hot in hotList.cat" ng-if="hotList.cat.length>0">
				<div class="titleDiv">
					<div class="bgBefore"><img ng-if="hot.cat_logo" src="{{hot.cat_logo}}" style="display: block; height:30px"></div>
					<span style="padding-left:15px;">{{hot.cat_name}}</span><span class="more" ng-click="do_more_calss(hot)">更多&nbsp;<i class="icon ion-chevron-right"></i></span>
				</div>
				<div class="goodsDiv" ng-repeat="goods in hot.cat_goods" ng-click="onshow_afsrue(goods)">
					<div class="imgDiv">
						<img src="{{goods.image||noImg}}">
					</div>
					<div class="name ellipsis-2">{{goods.name}}</div>
				</div>
			</div>
			
			<!--加载更多热销产品-->
			<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		</ion-scroll>
		
		<!--描述：回到顶部-->
		<div class="scroll-to-top" ng-class="showtop999" ng-click="doScrollToTop('main-handle',999)">
			<span class="icon ion-chevron-up"></span>
		</div>
	</ion-content>
</ion-view>